package com.asa.ui.J;

import java.awt.EventQueue;
import java.util.Arrays;

import com.asa.ui.frame.AlgoVisHelper;


public class AlgoVisualizer {
	private AlgoFrame frame;

	private CircleData data;
	
	public AlgoVisualizer(final int screenWidth,final int screenHeight,int Number){

		int R = Math.min(screenWidth,screenHeight)/2-2;
		data = new CircleData(screenWidth/2, screenHeight/2,R , R/2, 2);
		
		EventQueue.invokeLater(new Runnable() {//用java事件分发（开了个线程）的方法来创建对话框
			
			@Override
			public void run() {
				// TODO Auto-generated method stub
				frame=new AlgoFrame("分型几何",screenWidth,screenHeight);
				
				new Thread(new Runnable() {
					
					@Override
					public void run() {
						// TODO Auto-generated method stub
						runmiage();
					}
	
				}).start(); ;
				
			}
		});

	}
	
	
	
	private void runmiage() {
		// TODO Auto-generated method stub
		setData();
	}



	private void setData() {
		// TODO Auto-generated method stub
		frame.render(data);
		AlgoVisHelper.pause(100);
		
	}

}